// pages/person/person.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    name: '',
    identityCard: '',
    avatarUrl:'',
    nickName:'',
    matchCategoryGroupName:"",
    entryCode:"",
    matchCategoryGroupCode:""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      name: options.name,
      avatarUrl: options.avatarUrl,
      nickName: options.nickName,
      matchCategoryGroupName: options.matchCategoryGroupName,
      entryCode: options.entryCode,
      matchCategoryGroupCode: options.matchCategoryGroupCode
    });
  },

  handleCardNum(cardNum) {
    const newNum = cardNum.replace(/^(.{4})(?:\d+)(.{4})$/,"$1******$2");
    this.setData({
      identityCard: newNum
   })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})